import { DB } from "@/lib/db";
import { faker } from "@faker-js/faker";
import { genders, GenderSchema } from "@supersavely/db/schema";

const mock = () => {
  const data: Omit<Extract<GenderSchema, { mode: "addGender" }>, "mode">[] = [];

  data.push({
    name: "Male",
    description: "Male description",
  });
  data.push({
    name: "Female",
    description: "Female description",
  });
  data.push({
    name: "Trans Gender",
    description: "Trans gender description",
  });
  data.push({
    name: "Other Gender",
    description: "Other gender description",
  });

  return data;
};

export async function seed(db: DB) {
  console.log("start seeding genders");
  await db.insert(genders).values(mock());
}
